1. Field of the Invention
The present invention relates generally to templated patterns. Still more particularly, the present invention provides a method to apply a templated pattern to an object graph.
2. Description of the Related Art
The Service Data Objects (SDO) framework provides a unified framework for data application development. With SDO, you do not need to be familiar with a technology-specific application protocol interface (API) in order to access and utilize data. A user needs to know only one API, the SDO API, which lets the user work with data from multiple data sources, including relational databases, entity Enterprise JavaBeans (EJB) components, Extensible Markup Language (XML) pages, Web services, the Java™ Connector Architecture, JavaServer™ pages, and more.
Although the word “framework” is used, framework is analogous to the Eclipse framework. Eclipse is designed so that tools can be integrated together thanks to its solid and extensible base. SDO is similar in the sense that it provides a framework to which applications can be contributed and these applications will all be consistent with the SDO model.
Unlike some of the other data integration models, SDO does not stop at data abstraction. The SDO framework also incorporates a good number of Java™ 2 Platform Enterprise Edition (J2EE™) patterns and best practices, making it easy to incorporate proven architecture and designs into user applications. For example, the majority of Web applications today are not (and cannot) be connected to backend systems 100 percent of the time; so SDO supports a disconnected programming model. Likewise, today's applications tend to be remarkably complex, comprising many layers of concern.
XML is becoming ubiquitous in distributed applications. For example, XML Schema (XSD) is used to define business rules in an application's data format. Also, XML itself is used to facilitate interaction: Web services use XML-based Simple Object Access Protocol (SOAP) as the messaging technology. XML is a very important driver of SDO and is supported and integrated in the framework.
Data objects are the fundamental components of SDO. Data objects are the SDO representation of structured data. Data objects are generic and provide a common view of structured data built by a data mediators services (DMS). Data objects hold their “data” in properties. Data objects are linked together and contained in data graphs.
Data graphs provide a container for a tree of data objects. They are produced by the DMS for SDO clients to work with. A data graph contains a root data object, all of the root's associated data objects, and a change summary (more on change summaries in a moment). When being transmitted between application components (for example, between a Web service requester and provider during service invocation) the web service definition language (WSDL) is typed with DataGraphs which could be either Customer or Order or any object. This makes the contract between the sender and receiver implicit and unclear.
The purpose of a business is to deliver products to a market in order to make a profit. In general, a business has a number of processes, each of which can be characterized as a pattern of business events. A business also has a domain that can be characterized as a collection of business objects. Business objects are the “things” around which each business process is organized. Examples of business objects are products, customers, units in which the customers consume the products and in which the business produces them (seen in customer orders), resources that are contributed during the production process (materials, employees, machines), units in which these resources are acquired (seen in purchase orders), and suppliers of these resources.
Thus, it would be advantageous to provide a method to apply a templated pattern to an object graph that allows the WSDL part types to be typed with the templated Business Graph which defines an explicit contract between the peer services.